home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / NE2K.PCM / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  29KB  |  775 lines

  1. ;***********************************************************************
  2. ; Microsoft Windows NT Driver Library
  3. ;
  4. ; OEMSETUP.INF
  5. ;       NE2000 Compatible PCMCIA Adapter Setup for NT 3.51
  6. ;
  7. ;   Jun 28 1995  David Lao  Initial version
  8. ;*******************************************************************************
  9. [Identification]
  10.     OptionType = NetAdapter
  11.  
  12. [PlatformsSupported]
  13.     ISA
  14.     EISA
  15.     PCMCIA
  16.  
  17. [Options]
  18.     ACCTONEN2216
  19.     DLINKDE650
  20.     LINKSYSEC2T
  21.     NSCNE4100
  22.  
  23. [OptionsTextENG]
  24.     ACCTONEN2216   = "Accton EN2216 Ethernet PCMCIA Adapter"
  25.     DLINKDE650       = "D-Link DE-650 Ethernet PCMCIA Adapter"
  26.     LINKSYSEC2T       = "Linksys EC2T Ethernet PCMCIA Adapter"
  27.     NSCNE4100       = "National Semiconductor InfoMover NE4100"
  28.  
  29. [FileConstants]
  30. UtilityInf      = "UTILITY.INF"
  31. ParamInf        = "NCPARAM.INF"
  32. subroutineinf   = "SUBROUTN.INF"
  33. SoftwareType    = "driver"
  34. Exit_Code       = 0
  35. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  36. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  37. Manufacturer    = "Microsoft"
  38. ProductMajorVersion     = "3"
  39. ProductMinorVersion     = "51"
  40. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  41. ProductSoftwareName     = "NE2000"
  42. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ne2000.sys"
  43. NetRuleSoftwareType     = "ne2000Sys ndisDriver ne2000Driver"
  44. NetRuleSoftwareUse      = $(SoftwareType)
  45. NetRuleSoftwareBindForm = """Ne2000Sys"" yes no container"
  46. NetRuleSoftwareClass    = {"ne2000Driver basic"}
  47. NetRuleSoftwareBindable = {"ne2000Driver ne2000Adapter non exclusive 100"} 
  48. ProductHardwareName     = "NE2000"
  49. NetRuleHardwareType     = "ne2000 ne2000Adapter"
  50. NetRuleHardwareBindForm = " yes yes container"
  51. NetRuleHardwareClass    = {"ne2000Adapter basic"}
  52. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  53. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  54. PCMCIADBKeyName = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
  55. ACCTONEN2216Manufacture = "Accton"
  56. ACCTONEN2216Model       = "EN2216-PCMCIA-ETHERNET"
  57. DLINKDE650Manufacture   = "D-Link"
  58. DLINKDE650Model         = "DE-650"
  59. LINKSYSEC2TManufacture  = "Linksys"
  60. LINKSYSEC2TModel        = "E-CARD"
  61. NSCNE4100Manufacture    = "National Semiconductor"
  62. NSCNE4100Model         = "InfoMover NE4100"
  63.  
  64. [FileConstantsENG]
  65. ProCaption   = "Windows NT Setup"
  66. ProCancel    = "Cancel"
  67. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  68.                "Are you sure you want to cancel copying files?"
  69. ProCancelCap = "Network Setup Message"
  70. ProText1     = "Copying:"
  71. ProText2     = "To:"
  72. FunctionTitle   = "Microsoft NE2000 PCMCIA Card Setup"
  73. ProductSoftwareDescription      = "Microsoft NE2000 Adapter Driver"
  74. ProductSoftwareTitle            = "Microsoft NE2000 Adapter Driver"
  75. ProductHardwareACCTONEN2216Description  = "Accton EN2216 PCMCIA Adapter"
  76. ProductHardwareDLINKDE650Description    = "D-Link DE-650 PCMCIA Adapter"
  77. ProductHardwareLINKSYSEC2TDescription   = "Linksys EC2T PCMCIA Adapter"
  78. ProductHardwareNSCNE4100Description     = "National Semiconductor InfoMover NE4100"
  79. ProductHardwareACCTONEN2216Title  = "Accton EN2216 PCMCIA Adapter"
  80. ProductHardwareDLINKDE650Title    = "D-Link DE-650 PCMCIA Adapter"
  81. ProductHardwareLINKSYSEC2TTitle   = "Linksys EC2T PCMCIA Adapter"
  82. ProductHardwareNSCNE4100Title     = "National Semiconductor InfoMover NE4100"
  83. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  84. ShellCodeErrorText      = "Shell Code Error."
  85. IRQList  = ^(NE2000IRQChoices, 1)
  86. IRQValues = ^(NE2000IRQChoices, 2)
  87. IOBaseAddrList = ^(NE2000IOBaseAddrChoices, 1)
  88. IOBaseAddrValues = ^(NE2000IOBaseAddrChoices, 2)
  89. NE2000IRQDefault = 3
  90. NE2000IOBaseAddrDefault = 9
  91.  
  92. [GeneralConstants]
  93. from      = ""
  94. to        = ""
  95. ExitCodeOk     = 0
  96. ExitCodeCancel = 1
  97. ExitCodeFatal  = 2
  98. KeyNull         = ""
  99. MAXIMUM_ALLOWED   = 33554432
  100. RegistryErrorIndex = NO_ERROR
  101. KeyProduct      = ""
  102. KeyParameters   = ""
  103. TRUE            = 1
  104. FALSE           = 0
  105. NoTitle            = 0
  106. ExitState   = "Active"
  107. OldVersionExisted = $(FALSE)
  108. DriverPath      = $(!STF_NTPATH)\drivers
  109.  
  110. [date]
  111.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  112.  
  113. [Identify]
  114.     set !DebugOutputControl = 1
  115.     read-syms Identification
  116.     set Status     = STATUS_SUCCESSFUL
  117.     set Identifier = $(OptionType)
  118.     set Media      = #("Source Media Descriptions", 1, 1)
  119.     Return $(Status) $(Identifier) $(Media)
  120.  
  121. [ReturnOptions]
  122.     set !DebugOutputControl = 1
  123.     set Status        = STATUS_FAILED
  124.     set OptionList     = {}
  125.     set OptionTextList = {}
  126.     set LanguageList = ^(LanguagesSupported, 1)
  127.     Ifcontains(i) $($0) in $(LanguageList)
  128.         ifstr(i) $($1) == ""
  129.            goto returnoptions
  130.         endif
  131.         set PlatformList = ^(PlatformsSupported, 1)
  132.         Ifcontains(i) $($1) in $(PlatformList)
  133.            goto returnoptions
  134.         else
  135.            set Status = STATUS_NOTSUPPORTED
  136.            goto finish_ReturnOptions
  137.         endif
  138.     else
  139.         set Status = STATUS_NOLANGUAGE
  140.         goto finish_ReturnOptions
  141.     endif
  142. returnoptions = +
  143.     set OptionList     = ^(Options, 1)
  144.     set OptionTextList = ^(OptionsText$($0), 1)
  145.     set Status         = STATUS_SUCCESSFUL
  146. finish_ReturnOptions = +
  147.     Return $(Status) $(OptionList) $(OptionTextList)
  148.  
  149. [InstallOption]
  150.     set !DebugOutputControl = 1
  151.     set Option   = $($1)
  152.     set SrcDir   = $($2)
  153.     set AddCopy  = $($3)
  154.     set DoCopy   = $($4)
  155.     set DoConfig = $($5)
  156.     set LanguageList = ^(LanguagesSupported, 1)
  157.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  158.         Return STATUS_NOLANGUAGE
  159.     endif
  160.     set-subst LF = "\n"
  161.     read-syms GeneralConstants
  162.     read-syms FileConstants
  163.     read-syms DialogConstants$(!STF_LANGUAGE)
  164.     ifstr(i) $(!NTN_Origination) == "NCPA"
  165.         set Continue = $(OK)
  166.     endif
  167.     read-syms FileConstants$(!STF_LANGUAGE)
  168.     detect date
  169.     set-title  $(FunctionTitle)
  170.     set to   = Begin
  171.     set from = Begin
  172.     set CommonStatus = STATUS_SUCCESSFUL
  173.     EndWait
  174. Begin = +
  175.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  176.         set StartLabel = removeadapter
  177.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  178.         set StartLabel = UpgradeSoftware
  179.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  180.         set StartLabel = bindingadapter
  181.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  182.         set StartLabel = configureadapter
  183.         set CommonStatus = STATUS_REBOOT
  184.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  185.                         Debug-Output "Cannot configure the Novell 2000 driver software."
  186.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  187.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  188.                                 Debug-Output "ShellCode error: cannot get an error string."
  189.                                 goto ShellCodeError
  190.                         endif
  191.                         set Error = $($R0)
  192.                         set from = end
  193.                         set to = end
  194.                         goto nonfatalinfo
  195.                 endif
  196.     else
  197.                 set StartLabel = installadapter
  198.                 set OEM_ABANDON_OPTIONS = {}
  199.                 set OEM_ABANDON_SOFTWARE = FALSE
  200.                 set OEM_ABANDON_ON = TRUE
  201.     endif
  202.  
  203.     set from = $(fatal)
  204.     set to = $(fatal)
  205.     goto $(StartLabel)
  206.  
  207. installadapter = +
  208.  
  209.     OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName) $(MAXIMUM_ALLOWED) PCMCIADBKey
  210.     ifstr $(PCMCIADBKey) == $(NULL)    
  211.         CloseRegKey $(PCMCIADBKey)      
  212.     Debug-Output "PCMCIA service not present"
  213.         goto nonfatal
  214.     else
  215.         OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$($(Option)Manufacture) $(MAXIMUM_ALLOWED) PCMCIA$($(Option)Manufacture)Key
  216.         ifstr $(PCMCIA$($(Option)Manufacture)Key) == $(NULL)
  217.             debug-output "Adding "$(PCMCIADBKeyName)"\"$($(Option)Manufacture)
  218.         CreateRegKey $(PCMCIADBKey) {$($(Option)Manufacture), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$($(Option)Manufacture)Key
  219.         else 
  220.             debug-output "Manufacture sub key already exist"
  221.         endif
  222.         OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$($(Option)Manufacture)"\"$($(Option)Model) $(MAXIMUM_ALLOWED) PCMCIA$($(Option)Manufacture)$($(Option)Model)Key
  223.         ifstr $(PCMCIA$($(Option)Manufacture)$($(Option)Model)Key) == $(NULL)
  224.             debug-output "Adding "$(PCMCIADBKeyName)"\"$($(Option)Manufacture)"\"$($(Option)Model)
  225.             CreateRegKey $(PCMCIA$($(Option)Manufacture)Key) {$($(Option)Model), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$($(Option)Manufacture)$($(Option)Model)Key
  226.             SetRegValue $(PCMCIA$($(Option)Manufacture)$($(Option)Model)Key) {Driver, 0, $(!REG_VT_SZ),"ne2000"}
  227.         else
  228.             debug-output "Device sub key already exist"
  229.         endif
  230.         CloseRegKey $(PCMCIA$($(Option)Manufacture)$($(Option)Model)Key)
  231.         CloseRegKey $(PCMCIA$($(Option)Manufacture)Key)
  232.         CloseRegKey $(PCMCIADBKey)
  233.     endif
  234.  
  235.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  236.     Ifstr $(KeyProduct) != $(KeyNull)
  237.         CloseRegKey $(KeyProduct)
  238.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  239.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  240.                $(ProductVersion)
  241.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  242.                Debug-Output "ShellCode error: cannot get an error string."
  243.                goto ShellCodeError
  244.            endif
  245.            goto end
  246.         else
  247.            Shell $(UtilityInf), CardExistedDlg
  248.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  249.                Debug-Output "ShellCode error: cannot get an error string."
  250.                goto ShellCodeError
  251.            endif
  252.            ifstr(i) $($R1) != "OK"
  253.                set CommonStatus = STATUS_USERCANCEL
  254.                goto end
  255.            endif
  256.            set OldVersionExisted = $(TRUE)
  257.         endif
  258.     endif
  259.     Install "Install-Help"
  260.     set IRQValue = *($(IRQList), $(NE2000IRQDefault))
  261.     set IOBaseAddrValue = *($(IOBaseAddrList), $(NE2000IOBaseAddrDefault))
  262.     goto adapteroptions
  263. configureadapter = +
  264.     Ifstr $(KeyProduct) == $(KeyNull)
  265.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  266.         Ifstr $(KeyProduct) == $(KeyNull)
  267.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  268.             Debug-Output "Cannot find component product key"
  269.             goto fatalregistry
  270.         Endif
  271.     Endif
  272.     Debug-Output "INF: Shelling to FindService"
  273.     Shell $(UtilityInf) FindService, $(KeyProduct)
  274.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  275.         Debug-Output "INF: FindService shell failure"
  276.         Goto ShellCodeError
  277.     Endif
  278.     Ifstr(i) $($R0) != NO_ERROR
  279.         Debug-Output "INF: FindService Shell error: "$($R0)
  280.         Goto fatalregistry
  281.     endif
  282.     set KeyParameters = $($R2)
  283.     CloseRegKey $($R1)
  284.     Ifstr $(KeyParameters) == $(KeyNull)
  285.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  286.         Debug-Output "Cannot find component service"
  287.         goto fatalregistry
  288.     endif
  289.     set OldVersionExisted = $(TRUE)
  290.     set ValueName = ""
  291.     set ValueData = ""
  292.     set ValueStr  = ""
  293.     set ValueList = {}
  294.     EnumRegValue $(KeyParameters) ValueList
  295.  
  296.     ForListDo $(ValueList)
  297.         set ValueItem = $($)
  298.         set ValueName = *($(ValueItem),1)
  299.         set ValueData = *($(ValueItem),4)
  300.         Ifstr(i) $(ValueName) == "InterruptNumber"
  301.             set IRQValueIndex = $(ValueData)
  302.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  303.             set IOBaseAddrIndex = $(ValueData)
  304.         endif
  305.     EndForListDo
  306.  
  307.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  308.     ifstr(i) $(IRQValue) == ""
  309.     set IRQValue = *($(IRQList), 2)
  310.     endif
  311.  
  312.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  313.     ifstr(i) $(IOBaseAddrValue) == ""
  314.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  315.     endif
  316.  
  317. adapteroptions = +
  318.     set from = adapteroptions
  319.     sethelpfile "ne2kpcm.hlp" 100 100
  320.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  321.     ui start "InputDlg"
  322.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  323.                 set IRQValueIndex = $(Combo1Out)
  324.                 set IOBaseAddrIndex = $(Combo2Out)
  325.                 ui pop 1
  326.     else-ifstr(i) $(DLGEVENT) == "BACK"
  327.                 set CommonStatus = STATUS_USERCANCEL
  328.                 Debug-Output "Action: exit. Bye."
  329.                 ui pop 1
  330.                 goto end
  331.     else
  332.                 ui pop 1
  333.                 Debug-Output "Action: unknown. Bye."
  334.                 goto end
  335.     endif
  336. adapterverify =+
  337.         Goto skipoptions
  338. skipoptions =+
  339.     ifint $(OldVersionExisted) == $(TRUE)
  340.         ifstr(i) $(!NTN_InstallMode) == configure
  341.                 goto writeparameters
  342.         endif
  343.     endif
  344.     StartWait
  345.     ifint $(OldVersionExisted) == $(FALSE)
  346.         ifstr(i) $(!NTN_InstallMode) == "install"
  347.                 Ifstr(i) $(DoCopy) == "YES"
  348.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  349.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  350.                         Goto ShellCodeError
  351.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  352.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  353.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  354.                            goto ShellCodeError
  355.                         endif
  356.                         set Error = $($R0)
  357.                         Goto fatal
  358.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  359.                         Goto successful
  360.                     Endif
  361.                     Set SrcDir = $($R1)
  362.                 Endif
  363.                 install "Install-Option"
  364.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  365.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  366.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  367.                         goto ShellCodeError
  368.                     endif
  369.                     set Error = $($R0)
  370.                     goto fatal
  371.                 endif
  372.         endif
  373.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  374.                         $(ProductSoftwareName), +
  375.                         $(ProductSoftwareName), +
  376.                         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  377.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  378.                         $(NetEventDLL)
  379.        Set OEM_ABANDON_SOFTWARE = TRUE
  380.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  381.         Debug-Output "ShellCode error"
  382.         goto ShellCodeError
  383.        endif
  384.        set RegistryErrorIndex = $($R0)
  385.        set KeyProduct      = $($R1)
  386.        Set SoftNetRulesKey = $($R2)
  387.        CloseRegKey $($R3)
  388.        CloseRegKey $($R4)
  389.        CloseRegKey $($R5)
  390.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  391.         EndWait
  392.         Debug-Output "Registry error: add software components"
  393.         CloseRegKey $(KeyProduct)
  394.         CloseRegKey $(SoftNetRulesKey)
  395.         goto fatalregistry
  396.        endif
  397.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  398.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  399.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  400.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  401.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  402.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  403.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  404.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  405.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  406.         Debug-Output "ShellCode error."
  407.         goto ShellCodeError
  408.        endif
  409.        set RegistryErrorIndex = $($R0)
  410.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  411.         EndWait
  412.         Debug-Output "Registry error: add value list."
  413.         CloseRegKey $(KeyProduct)
  414.         CloseRegKey $(SoftNetRulesKey)
  415.         goto fatalregistry
  416.        endif
  417.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  418.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  419.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  420.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  421.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  422.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  423.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  424.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  425.         Debug-Output "ShellCode error."
  426.         goto ShellCodeError
  427.        endif
  428.        set RegistryErrorIndex = $($R0)
  429.        CloseRegKey $(KeyProduct)
  430.        CloseRegKey $(SoftNetRulesKey)
  431.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  432.         EndWait
  433.         Debug-Output "Resgitry error: add value list."
  434.         goto fatalregistry
  435.        endif
  436.     endif
  437.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  438.     ifint $($R4) != -1
  439.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  440.     endif
  441.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  442.                 Debug-Output "Cannot add hardware component"
  443.                 goto ShellCodeError
  444.     endif
  445.     set RegistryErrorIndex = $($R0)
  446.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  447.                 EndWait
  448.                 Debug-Output "Registry error: add hardware component"
  449.                 CloseRegKey $($R1)
  450.                 CloseRegKey $($R2)
  451.                 CloseRegKey $($R3)
  452.                 goto fatalregistry
  453.     endif
  454.     set KeyParameters = $($R3)
  455.     set KeyAdapterRules = $($R2)
  456.     set AdapterNumber = $($R4)
  457.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  458.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  459.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  460.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  461.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  462.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  463.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  464.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  465.                 Debug-Output "ShellCode error"
  466.                 goto ShellCodeError
  467.     endif
  468.     CloseRegKey $($R1)
  469.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  470.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  471.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  472.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  473.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  474.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  475.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  476.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  477.                 Debug-Output "ShellCode error."
  478.                 goto ShellCodeError
  479.     endif
  480.     set RegistryErrorIndex = $($R0)
  481.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  482.                 EndWait
  483.                 Debug-Output "Resgitry error: add value list."
  484.                 CloseRegKey $(KeyParameters)
  485.                 CloseRegKey $(KeyAdapterRules)
  486.                 goto fatalregistry
  487.     endif
  488.     CloseRegKey $(KeyAdapterRules)
  489.     goto writeparameters
  490. writeparameters = +
  491.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  492.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  493.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  494.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),1},+
  495.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),0},+
  496.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  497.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  498.                {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
  499.                        {IOLength,$(NoTitle),$(!REG_VT_DWORD),31}}
  500.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  501.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  502.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  503.     endif
  504.     CloseRegKey $(KeyParameters)
  505.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  506.                 Debug-Output "ShellCode error."
  507.                 goto ShellCodeError
  508.     endif
  509.     set RegistryErrorIndex = $($R0)
  510.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  511.                 Debug-Output "Registry error: Add value list"
  512.                 goto fatalregistry
  513.     endif
  514.     EndWait
  515.     goto successful
  516. bindingadapter =+
  517.     set Error = "Binding: Sorry, not yet implemented."
  518.     goto fatal
  519. removeadapter = +
  520.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  521.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  522.                                 $(ProductSoftwareName)
  523.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  524.                                 Debug-Output "ShellCode error"
  525.                                 goto ShellCodeError
  526.                 endif
  527.                 set RegistryErrorIndex = $($R0)
  528.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  529.                                 goto fatalregistry
  530.                 endif
  531.     else
  532.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  533.                         $(ProductSoftwareName), $(!NTN_RegBase)
  534.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  535.                                 Debug-Output "ShellCode error"
  536.                                 goto ShellCodeError
  537.                 endif
  538.                 set RegistryErrorIndex = $($R0)
  539.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  540.                                 goto fatalregistry
  541.                 endif
  542.     endif
  543.     goto end
  544. UpgradeSoftware = +
  545.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  546.     Ifstr $(KeyProduct) != $(KeyNull)
  547.         install "Install-Update"
  548.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  549.             goto fatal
  550.         endif
  551.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  552.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  553.         CloseRegKey $(KeyProduct)
  554.     else
  555.         goto fatalregistry
  556.     endif
  557.     goto end
  558. successful = +
  559.     goto end
  560. abandon = +
  561.     ForListDo $(OEM_ABANDON_OPTIONS)
  562.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  563.             $(ProductSoftwareName), $($)
  564.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.             Debug-Output "ShellCode error"
  566.             goto ShellCodeError
  567.         endif
  568.         set RegistryErrorIndex = $($R0)
  569.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  570.             goto fatalregistry
  571.         endif
  572.     EndForListDo
  573.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  574.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  575.             $(ProductSoftwareName), FALSE
  576.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  577.             Debug-Output "ShellCode error"
  578.             goto ShellCodeError
  579.         endif
  580.         set RegistryErrorIndex = $($R0)
  581.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  582.             goto fatalregistry
  583.         endif
  584.     endif
  585.     goto end
  586. warning = +
  587.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  588.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  589.         goto ShellCodeError
  590.     endif
  591.     ifstr(i) $($R1) == "OK"
  592.         goto $(to)
  593.     else-ifstr(i) $($R1) == "CANCEL"
  594.         goto $(from)
  595.     else
  596.         goto "end"
  597.     endif
  598. nonfatalinfo = +
  599.     Set CommonStatus = STATUS_USERCANCEL
  600.     Set Severity = STATUS
  601.     goto nonfatalmsg
  602. nonfatal = +
  603.     Set Severity = NONFATAL
  604.     goto nonfatalmsg
  605. nonfatalmsg = +
  606.     ifstr(i) $(Error) == ""
  607.         Set Severity = NONFATAL
  608.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  609.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  610.             goto ShellCodeError
  611.         endif
  612.         set Error = $($R0)
  613.     endif
  614.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  615.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  616.         goto ShellCodeError
  617.     endif
  618.     ifstr(i) $($R1) == "OK"
  619.         goto $(from)
  620.     else
  621.         goto "end"
  622.     endif
  623. fatalregistry = +
  624.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  625.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  626.         goto ShellCodeError
  627.     endif
  628.     set Error = $($R0)
  629.     goto fatal
  630. fataldetect = +
  631.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  632.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.         Debug-Output "ShellCode error: cannot get an error string."
  634.         goto ShellCodeError
  635.     endif
  636.     set Error = $($R0)
  637.     Goto fatal
  638. fatal = +
  639.     ifstr(i) $(Error) == ""
  640.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  641.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642.             goto ShellCodeError
  643.         endif
  644.         set Error = $($R0)
  645.     endif
  646.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  647.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  648.         goto ShellCodeError
  649.     endif
  650.     goto setfailed
  651. ShellCodeError = +
  652.     set DlgType      = "MessageBox"
  653.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  654.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  655.     set STF_MB_TYPE  = 1
  656.     set STF_MB_ICON  = 3
  657.     set STF_MB_DEF   = 1
  658.     ui start "Error Message"
  659.     goto setfailed
  660. setfailed = +
  661.     set CommonStatus = STATUS_FAILED
  662.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  663.         set OEM_ABANDON_ON = FALSE
  664.         goto abandon
  665.     endif
  666.     goto end
  667. end = +
  668.     goto term
  669. term = +
  670.     Return $(CommonStatus)
  671.  
  672. [Install-Option]
  673.     set STF_VITAL = ""
  674.     ifstr(i) $(AddCopy) == "YES"
  675.         AddSectionFilesToCopyList Files-NE2000 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  676.     endif
  677.     ifstr(i) $(DoCopy) == "YES"
  678.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  679.        CopyFilesInCopyList
  680.     endif
  681.     ifstr(i) $(DoConfig) == "YES"
  682.     endif
  683.     Exit
  684. [Install-Update]
  685.    set STF_VITAL        = ""
  686.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  687.    AddSectionFilesToCopyList Files-NE2000 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  688.    exit
  689. [Install-Help]
  690.    set STF_VITAL        = ""
  691.    AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  692.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  693.    CopyFilesInCopyList
  694.    exit
  695.  
  696. [Source Media Descriptions]
  697.     1 = "Windows NT Workstation CD-ROM"
  698.  
  699. [Signature]
  700.     FileType = MICROSOFT_DRVLIB_FILE
  701. [GetSignature]
  702.     read-syms Signature
  703.     return $(FileType)
  704.  
  705. [ProductType]
  706. STF_PRODUCT  = Winnt
  707. STF_PLATFORM = I386
  708.  
  709. [Files-Inf]
  710. 1,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  711.  
  712. [Files-Help]
  713. 1,      NE2KPCM.HLP ,     SIZE=999
  714.  
  715. [Files-NE2000]
  716. 1,      NE2000.SYS ,     SIZE=999
  717.  
  718. [LanguagesSupported]
  719.     ENG
  720.  
  721. [DialogConstantsENG]
  722. Help        = "&Help"
  723. Exit        = "Cancel"
  724. OK          = "OK"
  725. HelpContext = ""
  726. Continue    = "Continue"
  727. Cancel      = "Cancel"
  728.  
  729. [FileDependentDlgENG]
  730. Label1 = "&IRQ Level:"
  731. Label2 = "I/O &Port Address:"
  732. DlgType = "RadioCombination"
  733. DlgTemplate = "NE2000"
  734. Caption = $(FunctionTitle)
  735. Combo1List = $(IRQList)
  736. Combo1Out  = $(IRQValue)
  737. Combo2List = $(IOBaseAddrList)
  738. Combo2Out  = $(IOBaseAddrValue)
  739. ComboListItemsIn  = {Combo1List, Combo2List}
  740. ComboListItemsOut = {Combo1Out, Combo2Out}
  741. EditTextIn = ""
  742. EditTextLim = ""
  743. CBOptionsGreyed = {}
  744. NotifyFields = {NO, NO}
  745. HelpContext = 100
  746.  
  747. [NE2000IRQChoices]
  748. IRQ_1 = "3",3
  749. IRQ_2 = "4",4
  750. IRQ_3 = "5",5
  751. IRQ_4 = "6",6
  752. IRQ_5 = "7",7
  753. IRQ_6 = "9",9
  754. IRQ_7 = "10",10
  755. IRQ_8 = "11",11
  756. IRQ_9 = "12",12
  757. IRQ_10 = "15",15
  758.  
  759. [NE2000IOBaseAddrChoices]
  760. IOBase_1  = "0x200",512
  761. IOBase_2  = "0x220",544
  762. IOBase_3  = "0x240",576
  763. IOBase_4  = "0x260",608
  764. IOBase_5  = "0x280",640
  765. IOBase_6  = "0x2A0",672
  766. IOBase_7  = "0x2C0",704
  767. IOBase_8  = "0x2E0",736
  768. IOBase_9  = "0x300",768
  769. IOBase_10  = "0x320",800
  770. IOBase_11  = "0x340",832
  771. IOBase_12  = "0x360",864
  772. IOBase_13  = "0x380",896
  773. IOBase_14  = "0x3A0",928
  774. IOBase_15  = "0x3C0",960
  775. IOBase_16  = "0x3E0",992